package com.ruoyi.project.system.domain;

import java.math.BigDecimal;

import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.domain.BaseEntity;

/**
 * 充值记录对象 dt_recharge
 */
@Data
public class DtRecharge extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 充值ID
     */
    private Integer id;

    /**
     * 用户ID
     */
    @Excel(name = "用户ID")
    private Long userId;

    /**
     * 充值类型
     */
    @Excel(name = "充值类型")
    private String source;

    /**
     * 充值前余额
     */
    @Excel(name = "充值前余额")
    private BigDecimal beforeBalance;

    /**
     * 充值额
     */
    @Excel(name = "充值额")
    private BigDecimal amount;

    /**
     * 充值后余额
     */
    @Excel(name = "充值后余额")
    private BigDecimal afterBalance;

    /**
     * 支付单号
     */
    @Excel(name = "支付单号")
    private String outTradeNo;

    /**
     * 启用
     */
    @Excel(name = "启用")
    private String status;

    public DtRecharge() {
    }

    // 佣金发放
    public DtRecharge(Long userId, String source, BigDecimal amount, String status) {
        this.userId = userId;
//        this.source = "佣金";
        this.source = source;
        this.amount = amount;
        this.status = status;
    }

    public DtRecharge(Long userId, String source, BigDecimal amount, String status, String remark) {
        this(userId, source, amount, status);
        this.setRemark(remark);
    }

    public DtRecharge(Integer id, String status) {
        this.id = id;
        this.status = status;
    }
}
